package com.team2.shared;

import java.util.ArrayList;




public class ServerProduct implements java.io.Serializable, Comparable<ServerProduct>{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7115821217059693736L;


	public ServerProduct(String title, String description, String imageLink) {
		super();
		this.title = title;
		this.description = description;
		this.imageLink = imageLink;
	}
	public ServerProduct(){
	}
	private String id;
	private String title;
	private String description;
	private String imageLink;
	private String brand;
	private String condition;
	private String gtin; //Global Trade Item Number, the unique identifier
	private String link;
	private String price;
	private String modelNumber = "";
	private String provider; // A String indicating who provided the information. E.g. BestBuy, FutureShop
	private String inStoreAvailability = "Available";
	private String onlineAvailablility = "Available";
	private ArrayList<ServerStore> stores = new ArrayList<ServerStore>();
	private double similarity=0;
	private String imageFilePath = "";
	
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getImageLink() {
		return imageLink;
	}
	public void setImageLink(String imageLink) {
		this.imageLink = imageLink;
	}
	public String getBrand() {
		return brand;
	}
	public void setBrand(String brand) {
		this.brand = brand;
	}
	public String getCondition() {
		return condition;
	}
	public void setCondition(String condition) {
		this.condition = condition;
	}
	public String getGtin() {
		return gtin;
	}
	public void setGtin(String gtin) {
		this.gtin = gtin;
	}
	public ArrayList<ServerStore> getStores() {
		return stores;
	}
	public void setStores(ArrayList<ServerStore> stores) {
		this.stores = stores;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}

	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getModelNumber() {
		return modelNumber;
	}
	public void setModelNumber(String modelNumber) {
		this.modelNumber = modelNumber;
	}
	public String getProvider() {
		return provider;
	}
	public void setProvider(String provider) {
		this.provider = provider;
	}
	public String getInStoreAvailability() {
		return inStoreAvailability;
	}
	public void setInStoreAvailability(String inStoreAvailability) {
		this.inStoreAvailability = inStoreAvailability;
	}
	public String getOnlineAvailablility() {
		return onlineAvailablility;
	}
	public void setOnlineAvailablility(String onlineAvailablility) {
		this.onlineAvailablility = onlineAvailablility;
	}
	public double getSimilarity() {
		return similarity;
	}
	public void setSimilarity(double similarity) {
		this.similarity = similarity;
	}
	public String getImageFilePath() {
		return imageFilePath;
	}
	public void setImageFilePath(String imageFilePath) {
		this.imageFilePath = imageFilePath;
	}
	@Override
	public int compareTo(ServerProduct o) {
		// TODO Auto-generated method stub
		int value =(int)(o.getSimilarity()-this.getSimilarity());
		return value;
	}
	
}
